package com.springboot.consumer.controller;

import com.springboot.consumer.pojo.User;
import com.springboot.consumer.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author XiaoLuo
 * @ClassName: ConsumerController
 * @Description: ${todo}
 * @date 2019/4/6 21:36
 */
@RestController
@RequestMapping("consume")
public class ConsumerController {
    @Autowired
    private UserService userService;
    @GetMapping
    public List<User> consume(@RequestParam("ids")List<Long> ids){
        return this.userService.queryUserByIds(ids);
    }
}
